from fastapi import FastAPI, Form, File, UploadFile
from devOps.develop import ops
from devOps.develop import database

devOps = FastAPI()
@devOps.get("/")
def get_status():
  database.yugabyte()
  return {
    "code": 200,
    "message": "OK",
    "data": True,
  }

@devOps.post("/dev")
async def cmd_ops(source: str = Form(), to: str = Form(), file: UploadFile = File()):
  return await ops.bash_lh(source, to, file)
